﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="List.aspx.cs" Inherits="X.WebSite.Admin.News.List" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    新闻<a href="Detail.aspx">新增</a><asp:GridView ID="gvNews" runat="server" AutoGenerateColumns="False"
        EnableModelValidation="True" DataKeyNames="Id">
        <Columns>
            <asp:TemplateField HeaderText="标题">
                <ItemTemplate>
                    <asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl=' <%# X.Common.StringUtils.HtmlDecode(Eval("Title", "/News/{0}.aspx")).Replace(" ","-") %>'
                        Text='<%# Eval("Title") %>' Target="_blank"></asp:HyperLink>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:HyperLinkField DataNavigateUrlFields="Id" DataNavigateUrlFormatString="Detail.aspx?Id={0}"
                Text="编辑" />
            <asp:CommandField ShowDeleteButton="True" />
        </Columns>
    </asp:GridView>
    </form>
</body>
</html>
